<%@ include file="../common/base.jsp" %>
<%@ page contentType= "text/html;charset=utf-8" %>
<%@ page language="java" import="com.octopus.optiworks.service.ConfigurationService"%>
<% boolean isAutoOperatorDate = ConfigurationService.getInstance().isAutoOpeartorDate() ; %>

<c:forEach var="step150Data" varStatus="status" items="${product.step150Datas}">
<c:if test="${not empty step150}">
<input type="hidden" name="id" value="<c:out value="${step150Data.id}" />">
<input type="hidden" name="product" value="<c:out value="${step150Data.product.id}" />">
<input type="hidden" name="className" value="com.octopus.optiworks.model.Step150Data">
<input type="hidden" name="step" value="step150">

<table rules="all" width="100%" bgcolor="#F0F0FF">
	<tr>
		<td width="40%">
			<strong style="color:#A0A0FF">Step 150 封装 (MPI: ZY-60-079)</strong>
		</td>		
		<% if(isAutoOperatorDate){ %>
		<td width="30%">
			Operator:
			<c:out value="${step150Data.operator}" />
		</td>
		<td width="30%">
			Date:
			<fmt:formatDate  value="${step150Data.date}" pattern="yyyy-MM-dd HH:mm"/>
		</td>
		<% }else{ %>
		<td width="30%">
			Operator:
			<select name="operator">
			<c:forEach var="user" items="${users}">
			<option value="<c:out value="${user.username}" />" 
			<c:if test="${(null==step150Data.operator && user.username==currentUser.username) || (null!=step150Data.operator && user.username==step150Data.operator)}">
			selected="selected"
			</c:if>
			><c:out value="${user.username}" /></option>
			</c:forEach>
			</select>
		</td>
		<td width="30%">
			Date:
			<input type="text" name="date" onfocus="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm'})" class="Wdate" style="width:130px" value="<fmt:formatDate  value="${step150Data.date}" pattern="yyyy-MM-dd HH:mm"/>">
		</td>
		<% } %>
	</tr>
</table>
</c:if>

<c:if test="${empty step150}">
<table rules="all" width="100%">
	<tr>
		<td width="40%">
			<strong>Step 150 封装 (MPI: ZY-60-079)</strong>
			<shiro:hasPermission name="process:edit">
			<c:if test="${empty step150 && empty View}">
			&nbsp;&nbsp;
			<a href="./sedit.o?productId=<c:out value='${product.id}'/>&step=step150">
				<fmt:message key="Edit" />
			</a>
			</c:if>
			</shiro:hasPermission>
		</td>
		<td width="30%">
			Operator:
			<c:out value="${step150Data.operator}" />
		</td>
		<td width="30%">
			Date:
			<fmt:formatDate  value="${step150Data.date}" pattern="yyyy-MM-dd HH:mm"/>
		</td>
	</tr>
</table>
</c:if>
</c:forEach>


